package com.jltx.zeus.viewmodel.ext

import android.app.Activity

/**
 * @author aidenquan
 *         Created by junlintianxia on 2021/09/03.
 */
/**
 * Retrieve argument from Activity intent
 */
fun <T : Any> Activity.argument(key: String) =
    lazy { intent.extras?.get(key) as? T ?: error("Intent Argument $key is missing") }